package com.houtai.eduservice.entity.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;

@Data
public class CourseInfoVo {
    @ApiModelProperty(value = "课程ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "课程讲师ID")
    private Integer teacherId;

    @ApiModelProperty(value = "课程专业ID")
    private Integer subjectId;

    @ApiModelProperty(value = "课程专业父级ID")
    private Integer subjectParentId;

    @NotBlank(message = "标题不能为空")
    @Length(min=1,max=20,message = "长度最大为20")
    @ApiModelProperty(value = "课程标题")
    private String title;

    @ApiModelProperty(value = "课程销售价格，设置为0则可免费观看")
    private BigDecimal price;

    @ApiModelProperty(value = "总课时")
    private Integer lessonNum;

    @ApiModelProperty(value = "课程封面图片路径")
    private String cover;

    @NotBlank(message = "简介不能为空")
    @Length(min=1,max=300,message = "长度最大为300")
    @ApiModelProperty(value = "课程简介")
    private String description;
}
